package com.jl.cloud.terminal.service.impl;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.jl.cloud.commom.base.BaseService;
import com.jl.cloud.terminal.model.Consumers;
import com.jl.cloud.terminal.service.ConsumersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service("consumersServiceInner")
@DS("jl-consumer")
public class ConsumersServiceImpl extends BaseService<Consumers> implements ConsumersService {


    @Override
    public List<Consumers> findAll() {
        return this.selectAll();
    }


    @Override
    public void updateTransaction(Integer i ) {
        if(i % 5 == 0){
            i = null;
            i.toString();
        }
        Consumers consumers = Consumers.builder().id(1).name(i.toString()).build();
            updateById(consumers);
    }
}
